import request from '@/utils/request'

// 查询告警生成规则定义列表
export function listGenerateRule(query) {
  return request({
    url: '/am/generateRule/list',
    method: 'get',
    params: query
  })
}

// 查询告警生成规则定义详细
export function getGenerateRule(id) {
  return request({
    url: '/am/generateRule/' + id,
    method: 'get'
  })
}

// 新增告警生成规则定义
export function addGenerateRule(data) {
  return request({
    url: '/am/generateRule',
    method: 'post',
    data: data
  })
}

// 修改告警生成规则定义
export function updateGenerateRule(data) {
  return request({
    url: '/am/generateRule',
    method: 'put',
    data: data
  })
}

// 删除告警生成规则定义
export function delGenerateRule(id) {
  return request({
    url: '/am/generateRule/' + id,
    method: 'delete'
  })
}
